#!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime

from django.db import models


# Create your models here.

class EmailDo(models.Model):
    code = models.CharField(max_length=20, verbose_name='验证码')
    name = models.CharField(max_length=20, verbose_name='姓名')
    email = models.EmailField(max_length=50, verbose_name='邮箱')
    send_type = models.CharField(max_length=18,
                                 choices=(('register', '邮箱'), ('forget', '修改密码'), ('update_email', '修改邮箱')),
                                 verbose_name='验证码类型')
    send_time = models.DateField(default=datetime.now, verbose_name='发送时间')

    class Meta:
        app_label = 'hair_star'
        verbose_name = '螺蛳粉'
        verbose_name_plural = '螺蛳粉'

    def __str__(self):
        return self.email
